#pragma once

#include <QDialog>
#include <QSettings>
#include <QString>
#include "ui_MonitorSettings.h"

#define APP_KEY_SERVER "ServerInfo"
#define APP_KEY_LOCAL "Local"
#define APP_KEY_FLOW_LOW_ALARM "0"
#define APP_KEY_FLOW_HI_ALARM "1"
#define APP_KEY_TEMP_LOW_ALARM "2"
#define APP_KEY_TEMP_HI_ALARM "3"
#define APP_KEY_PRESS_LOW_ALARM "4"
#define APP_KEY_PRESS_HI_ALARM "5"
#define APP_KEY_DPRESS_LOW_ALARM "6"
#define APP_KEY_DPRESS_HI_ALARM "7"

// Server
#define VALUE_KEY_SERVER_IP "IP"
#define VALUE_KEY_SERVER_PORT "port"
//Local
#define VALUE_KEY_CYCLE_TIMES "AudioCycleTimes"
#define VALUE_KEY_CYCLE_ALWAYS "AudioCycleAlways"


#define VALUE_KEY_ENABLE "Enable"
#define VALUE_KEY_AUDIO_PATH "AudioPath"

#define VALUE_KEY_NOTABLE "N/A"

#define QSETTINGS_KEY(a, v) QString("%1/%2").arg(a).arg(v)


class MonitorSettings : public QDialog
{
	Q_OBJECT
public:
	MonitorSettings(QSettings* s, QWidget *parent = nullptr);
	~MonitorSettings();
private:
	void UpdateData();
private slots:
	void OnBtnSave();
	void on_pushButton_b1_clicked();
	void on_pushButton_b2_clicked();
	void on_pushButton_b3_clicked();
	void on_pushButton_b4_clicked();
	void on_pushButton_b5_clicked();
	void on_pushButton_b6_clicked();
	void on_pushButton_b7_clicked();
	void on_pushButton_b8_clicked();
private:
	Ui::MonitorSettingsClass ui;
	QSettings* settings;
};
